import request from '/@/utils/request';

// 查询拼团商品列列表
export function listProduct(query?: Object) {
  return request({
    url: '/module/group/product/list',
    method: 'get',
    params: query
  })
}

// 查询拼团商品列详细
export function getProduct(id?: number) {
  return request({
    url: '/module/group/product/' + id,
    method: 'get'
  })
}

// 新增拼团商品列
export function addProduct(data?: Object) {
  return request({
    url: '/module/group/product',
    method: 'post',
    data
  })
}

// 修改拼团商品列
export function updateProduct(data?: Object) {
  return request({
    url: '/module/group/product',
    method: 'put',
    data
  })
}

// 删除拼团商品列
export function delProduct(id?: number) {
  return request({
    url: '/module/group/product/' + id,
    method: 'delete'
  })
}

// 导出拼团商品列
export function exportProduct(query?: Object) {
  return request({
    url: '/module/group/product/export',
    method: 'get',
    params: query
  })
}
